﻿using System.Collections.Generic;
using System.Text;
using RuTracker.Messenger.Error;

namespace RuTracker.Messenger
{
    public class QueueMessagesResult<T>
    {
        public QueueMessagesResult(List<T> messages, MessageErrorCollection errorCollection)
        {
            Messages = messages;
            ErrorCollection = errorCollection;
        }

        public bool IsEmpty 
        {
            get { return Messages.Count == 0; }
        }

        public bool HasErrors
        {
            get { return !ErrorCollection.IsEmpty; }
        }

        public List<T> Messages { get; private set; }
        public MessageErrorCollection ErrorCollection { get; private set; }
    }
}
